package com.jyu.sati.business.service;

import java.util.List;

import com.jyu.sati.common.exception.BusinessException;
import com.jyu.sati.entity.Adminstrator;
import com.jyu.sati.vo.AdministratorInfoVo;
import com.jyu.sati.vo.UserInfoPageVo;
import com.jyu.sati.vo.UserInfoVo;

public interface AdministratorService {

	int deleteByAdminId(Integer administratorId) throws BusinessException;

	int insert(Adminstrator record) throws BusinessException;

	int insertSelective(Adminstrator record) throws BusinessException;

	Adminstrator getAdminByAdminId(Integer administratorId) throws BusinessException;

	/**
	 * 更新非空字段
	 * 
	 * @param record
	 * @return
	 */
	int updateSelective(Adminstrator record) throws BusinessException;

	int update(Adminstrator record) throws BusinessException;

	/**
	 * 获取一页超级管理员用户数据
	 * 
	 * @param condition
	 * @return
	 */
	List<UserInfoVo> getSuperUserInfoPageByCondition(UserInfoPageVo condition) throws BusinessException;

	/**
	 * 根据查询条件获取总数(超级管理员)
	 * 
	 * @param condition
	 * @return
	 */
	Integer getSuperTotalNoByCondition(UserInfoPageVo condition) throws BusinessException;

	/**
	 * 获取一页平台管理员用户数据
	 * 
	 * @param condition
	 * @return
	 */
	List<UserInfoVo> getPlatformUserInfoPageByCondition(UserInfoPageVo condition) throws BusinessException;

	/**
	 * 根据查询条件获取总数 (平台管理员)
	 * 
	 * @param condition
	 * @return
	 */
	Integer getPlatformTotalNoByCondition(UserInfoPageVo condition) throws BusinessException;

	/**
	 * 获取管理员自己的信息
	 * 
	 * @return
	 * @throws BusinessException
	 */
	AdministratorInfoVo getAdministratorInfo() throws BusinessException;

	/**
	 * 通过用户id获取管理员信息
	 * 
	 * @param userId
	 * @return
	 * @throws BusinessException
	 */
	AdministratorInfoVo getAdministratorInfoByUserId(String userId) throws BusinessException;

	/**
	 * 更新下管理员信息
	 * 
	 * @param adminInfo
	 * @throws BusinessException
	 */
	void updateAdministratorInfo(AdministratorInfoVo adminInfo) throws BusinessException;

}
